package com.soft.javase.ch02.test04;

/**
 * @author wangzhisen
 * @Desc TODO
 * @date 2025/4/18
 *
 * 4.现有员工Employee类，有姓名，地址，基本工资属性，
 * 董事类和经理类除以上属性，董事类有交通补助，经理类有所管部门，
 * 三个类中都有显示其基本信息的方法show，但其实现方式不同，
 * 请写出各类构造方法，及属性的get，set方法。
 * 并要用到this和super关键字。
 */
public class Employee {
    private String name;
    private String address;
    private double basicSalary;

    public Employee(String name, String address, double basicSalary) {
        this.name = name;
        this.address = address;
        this.basicSalary = basicSalary;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public double getBasicSalary() {
        return basicSalary;
    }

    public void setBasicSalary(double basicSalary) {
        this.basicSalary = basicSalary;
    }

    public void show() {
        System.out.println("姓名: " + name + ", 地址: " + address + ", 基本工资: " + basicSalary);
    }
}
